#vertex --------------------------------
attribute vec3 position:POSITION;
uniform mat4 game_MatrixVP:VP;
uniform mat4 game_MatrixM:M;
#ifdef NORMAL
attribute vec3 normal:NORMAL;
varying vec3 vnormal;
#endif
#include skinning
uniform vec4 gcolor:COLOR;
void main(void){
    mat4 modelMat =game_MatrixM;
    #ifdef BONE
    #ifdef SKINNING
        modelMat=getBoneMatrix(a_weights,a_indices);
    #endif
    #endif
    vec4 wp=modelMat*vec4(position,1.0);
    #ifdef NORMAL
    vnormal=normalize(vec3(modelMat * vec4(normal.xyz, 0.0)));
    wp.xyz+=vnormal*gcolor.w;
    #endif
    gl_Position = game_MatrixVP * wp;
}
#fragment ------------------------------
uniform vec4 gcolor:COLOR;
void main(void){
    gl_FragColor = vec4(gcolor.rgb,1.);
}
